package com.gemme.gemme.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.gemme.gemme.R;
import com.gemme.gemme.wode.WuliuBean;

public class SingleWuliuView extends RelativeLayout {
    private Context context;
    public SingleWuliuView(Context context) {
        this(context,null);
    }

    public SingleWuliuView(Context context, AttributeSet attrs) {
        this(context, attrs,0);
    }

    public SingleWuliuView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        this.context = context;
        initView();
    }
    TextView tv_name;
    TextView tv_time;
    private void initView() {
        LayoutInflater.from(context).inflate(R.layout.single_wuliu_view,this);

        tv_name = findViewById(R.id.tv_name);
        tv_time = findViewById(R.id.tv_time);
    }

    public void setData(WuliuBean.ResultBean.ListBean bean) {
        try {
            if(bean == null)
                return;
            tv_name.setText(bean.getStatus() + "");
            tv_time.setText(bean.getTime() + "");
        }catch (Exception e){

        }
    }
}
